//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package sort.recharge;

import java.util.*;

public class PaymentRechargeList  {
    private String type;
    private Long balance;
    private Long balance1;
    private Long balance2;
    private Long balance3;
    private String balanceObjectID;
    private Date createDate;
    private Date effectiveDate;
    private Date expireDate;
    private Map<String, String> extProperties;
    private Date lastUpdateDate;
    private Date lastSwitchDate;
    private Long objectID;
    private String rechargeNum;
    private String currency;
    private Date lastChangeDate;
    private String account;
    private Long originalValue;
    private String isValid;
    private String reserved0;
    private String reserved1;
    private String reserved2;
    private String reserved3;
    private String reserved4;
    private String reserved5;
    private String reserved6;
    private String reserved7;
    private String reserved8;
    private String reserved9;

    public PaymentRechargeList() {
    }

    public PaymentRechargeList( Map<String, String> extInfos, Date effectiveDate, Date expireDate) {
        this.effectiveDate = effectiveDate;
        this.expireDate = expireDate;
        this.transReserveds(extInfos);
        this.extProperties = extInfos;
    }

    public void transReserveds(Map<String, String> extInfos) {
        if (null != extInfos && !extInfos.isEmpty()) {
            if (extInfos.containsKey("reserved0")) {
                this.reserved0 = (String)extInfos.get("reserved0");
                extInfos.remove("reserved0");
            }

            if (extInfos.containsKey("reserved1")) {
                this.reserved1 = (String)extInfos.get("reserved1");
                extInfos.remove("reserved1");
            }

            if (extInfos.containsKey("reserved2")) {
                this.reserved2 = (String)extInfos.get("reserved2");
                extInfos.remove("reserved2");
            }

            if (extInfos.containsKey("reserved3")) {
                this.reserved3 = (String)extInfos.get("reserved3");
                extInfos.remove("reserved3");
            }

            if (extInfos.containsKey("reserved4")) {
                this.reserved4 = (String)extInfos.get("reserved4");
                extInfos.remove("reserved4");
            }

            if (extInfos.containsKey("reserved5")) {
                this.reserved5 = (String)extInfos.get("reserved5");
                extInfos.remove("reserved5");
            }

            if (extInfos.containsKey("reserved6")) {
                this.reserved6 = (String)extInfos.get("reserved6");
                extInfos.remove("reserved6");
            }

            if (extInfos.containsKey("reserved7")) {
                this.reserved7 = (String)extInfos.get("reserved7");
                extInfos.remove("reserved7");
            }

            if (extInfos.containsKey("reserved8")) {
                this.reserved8 = (String)extInfos.get("reserved8");
                extInfos.remove("reserved8");
            }

            if (extInfos.containsKey("reserved9")) {
                this.reserved9 = (String)extInfos.get("reserved9");
                extInfos.remove("reserved9");
            }
        }

    }

    public void setBalance(Long balance) {
        this.balance = balance;
    }

    public Long getBalance() {
        return this.balance;
    }

    public void setBalance2(Long balance2) {
        this.balance2 = balance2;
    }

    public Long getBalance2() {
        return this.balance2;
    }

    public void setBalanceObjectID(String balanceObjectID) {
        this.balanceObjectID = balanceObjectID;
    }

    public String getBalanceObjectID() {
        return this.balanceObjectID;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getCreateDate() {
        return this.createDate;
    }

    public void setEffectiveDate(Date effectiveDate) {
        this.effectiveDate = effectiveDate;
    }

    public Date getEffectiveDate() {
        return this.effectiveDate;
    }

    public void setExpireDate(Date expireDate) {
        this.expireDate = expireDate;
    }

    public Date getExpireDate() {
        return this.expireDate;
    }

    public void setExtProperties(Map<String, String> extProperties) {
        this.extProperties = extProperties;
    }

    public Map<String, String> getExtProperties() {
        return this.extProperties;
    }

    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    public Date getLastUpdateDate() {
        return this.lastUpdateDate;
    }

    public void setObjectID(Long objectID) {
        this.objectID = objectID;
    }

    public Long getObjectID() {
        return this.objectID;
    }

    public String toString() {
        return "PaymentRechargeList [type=" + this.type + ", balance=" + this.balance + ", balance1=" + this.balance1 + ", balance2=" + this.balance2 + ", balance3=" + this.balance3 + ", balanceObjectID=" + this.balanceObjectID + ", createDate=" + this.createDate + ", effectiveDate=" + this.effectiveDate + ", expireDate=" + this.expireDate + ", extProperties=" + this.extProperties + ", lastUpdateDate=" + this.lastUpdateDate + ", lastSwitchDate=" + this.lastSwitchDate + ", objectID=" + this.objectID + ", rechargeNum=" + this.rechargeNum + ", currency=" + this.currency + ", lastChangeDate=" + this.lastChangeDate + ", account=" + this.account + ", originalValue=" + this.originalValue + ", isValid=" + this.isValid + ", reserved0=" + this.reserved0 + ", reserved1=" + this.reserved1 + ", reserved2=" + this.reserved2 + ", reserved3=" + this.reserved3 + ", reserved4=" + this.reserved4 + ", reserved5=" + this.reserved5 + ", reserved6=" + this.reserved6 + ", reserved7=" + this.reserved7 + ", reserved8=" + this.reserved8 + ", reserved9=" + this.reserved9 + ", toString()=" + super.toString() + "]";
    }

    public String getRechargeNum() {
        return this.rechargeNum;
    }

    public void setRechargeNum(String rechargeNum) {
        this.rechargeNum = rechargeNum;
    }

    public String getCurrency() {
        return this.currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    public Long getBalance3() {
        return this.balance3;
    }

    public void setBalance3(Long balance3) {
        this.balance3 = balance3;
    }

    public Date getLastSwitchDate() {
        return this.lastSwitchDate;
    }

    public void setLastSwitchDate(Date lastSwitchDate) {
        this.lastSwitchDate = lastSwitchDate;
    }

    public Long getBalance1() {
        return this.balance1;
    }

    public void setBalance1(Long balance1) {
        this.balance1 = balance1;
    }

    public Date getLastChangeDate() {
        return this.lastChangeDate;
    }

    public void setLastChangeDate(Date lastChangeDate) {
        this.lastChangeDate = lastChangeDate;
    }

    public String getAccount() {
        return this.account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public Long getOriginalValue() {
        return this.originalValue;
    }

    public void setOriginalValue(Long originalValue) {
        this.originalValue = originalValue;
    }

    public String getIsValid() {
        return this.isValid;
    }

    public void setIsValid(String isValid) {
        this.isValid = isValid;
    }

    public String getReserved0() {
        return this.reserved0;
    }

    public void setReserved0(String reserved0) {
        this.reserved0 = reserved0;
    }

    public String getReserved1() {
        return this.reserved1;
    }

    public void setReserved1(String reserved1) {
        this.reserved1 = reserved1;
    }

    public String getReserved2() {
        return this.reserved2;
    }

    public void setReserved2(String reserved2) {
        this.reserved2 = reserved2;
    }

    public String getReserved3() {
        return this.reserved3;
    }

    public void setReserved3(String reserved3) {
        this.reserved3 = reserved3;
    }

    public String getReserved4() {
        return this.reserved4;
    }

    public void setReserved4(String reserved4) {
        this.reserved4 = reserved4;
    }

    public String getReserved5() {
        return this.reserved5;
    }

    public void setReserved5(String reserved5) {
        this.reserved5 = reserved5;
    }

    public String getReserved6() {
        return this.reserved6;
    }

    public void setReserved6(String reserved6) {
        this.reserved6 = reserved6;
    }

    public String getReserved7() {
        return this.reserved7;
    }

    public void setReserved7(String reserved7) {
        this.reserved7 = reserved7;
    }

    public String getReserved8() {
        return this.reserved8;
    }

    public void setReserved8(String reserved8) {
        this.reserved8 = reserved8;
    }

    public String getReserved9() {
        return this.reserved9;
    }

    public void setReserved9(String reserved9) {
        this.reserved9 = reserved9;
    }

    public CurrencyType getVirtualCurrencyType() {
        CurrencyType type = CurrencyType.INVALID;
        if (this.extProperties == null ||extProperties.isEmpty() ) {
            return type;
        } else {
            String ticketType = (String)this.extProperties.get("ticketType");
            String isPay = (String)this.extProperties.get("isPay");
            String realFee = (String)this.extProperties.get("realFee");
            boolean isFree = "1".equals(ticketType) || "2".equals(ticketType) || "3".equals(ticketType) || "6".equals(ticketType) || "0".equals(ticketType) && (!"1".equals(isPay) || "0".equals(realFee));
            if (isFree) {
                return CurrencyType.FREE;
            } else {
                Long realFeeLong = null;

                try {
                    realFeeLong = Long.valueOf(realFee);
                } catch (Exception var8) {
                    realFeeLong = null;
                }

                boolean isRecharge = "4".equals(ticketType) || "5".equals(ticketType) || "7".equals(ticketType) || "8".equals(ticketType) || "9".equals(ticketType) || "10".equals(ticketType) || "0".equals(ticketType) && ("1".equals(isPay) || null != realFeeLong && realFeeLong > 0L);
                return isRecharge ? CurrencyType.RECHARGE : type;
            }
        }
    }

    public float getDisacountRatio() {
        String realFee = null == this.extProperties ? null : (String)this.extProperties.get("realFee");
        Long realFeeLong = null;

        try {
            realFeeLong = Long.valueOf(realFee);
        } catch (Exception var4) {
            realFeeLong = null;
        }

        float ratio = 0.0F / 0.0F;
        if (null != realFeeLong && 0L != realFeeLong && null != this.originalValue && 0L != this.originalValue) {
            ratio = (float)(1L - realFeeLong / this.originalValue);
        }
        return ratio;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getType() {
        return this.type;
    }

}
